<?php
	class plan extends BaseController{
		public $security_level = SECURITY_LEVEL_USER;
		
		public function getData($in_params){
			$this->template_data["open"] = ((time() > START_TIME) && (time() < END_TIME) || $_SESSION["user"]["security_level"] >= SECURITY_LEVEL_ADMIN);
            $reservation = new InteractiveReservation();

            $this->template_data["userSeats"] =        json_encode($reservation->GetUserSeats());
            $this->template_data["reservedSeats"] =    json_encode($reservation->GetReservedSeats());
            $this->template_data["userOrderedSeats"] = json_encode($reservation->GetUserOrderedSeats());
            $this->template_data["maxOrders"] = ($_SESSION["user"]["security_level"] >= SECURITY_LEVEL_ADMIN) ? 999 : MAX_SEATS_PER_USER;
            return;
		}
	}